from alg import punishment_number
from gen import generate_n

def test():
    # 随机生成n
    n = generate_n(1, 100)
    print(f"测试 n = {n}")
    result = punishment_number(n)
    print(f"惩罚数: {result}")

    # 边界测试
    for n in [1, 10, 37, 100]:
        print(f"n = {n}, 惩罚数 = {punishment_number(n)}")

if __name__ == "__main__":
    test()
